import request  from '@/utils/request';

import { BASE_URL, OPS_URL } from '@/config/query';

export async function queryPage(params) {
  return request(`${BASE_URL}/device_fire_host_child/page`, params)
}

export async function queryInfoById(id) {
  return request(`${BASE_URL}/device_fire_host_child/detail/${id}`)
}

export async function remove(id) {
  return request(`${BASE_URL}/device_fire_host_child/remove/${id}`)
}

export async function create(params) {
  return request(`${BASE_URL}/device_fire_host_child/create`, params)
}

export async function update(params) {
  return request(`${BASE_URL}/device_fire_host_child/modify`, params)
}

export async function queryLog(params) {
  return request(`${BASE_URL}/device_data_push_log/list`, params);
}

export async function queryCount(params) {
  return request(`${BASE_URL}/device_fire_host_child/run_status/count`, params);
}

export async function queryLocation({ tail, ...res }) {
  return request(`${BASE_URL}/${tail}/list`, res)
}

export async function queryType({ tail, ...res }) {
  return request(`${OPS_URL}/dict/permission_none/${tail}`, res)
}

export async function queryBrand({ tail, ...res }) {
  return request(`${BASE_URL}/${tail}/list`, res)
}

export async function queryFloorById(id) {
  return request(`${BASE_URL}/floor_plan/detail/${id}`)
}

export async function queryTransform() {
  return request(`${BASE_URL}/device_transmission/list`)
}
